package com.waiting.java8.feature;

import java.lang.reflect.Method;
import java.util.Arrays;

/**
 * @author bjweitingting
 * @description
 * @date 2018/8/21
 **/
public class DefaultInterfaceImpl implements DefaultInterface, DefaultInterface2 {
    public static void main(String[] args) {
        DefaultInterface test = new DefaultInterfaceImpl();
        test.test();
        test.test("20180821");
        Method[] methods = test.getClass().getMethods();
        Arrays.stream(methods).forEach(item -> System.out.println(item.getName()));

    }



    @Override
    public void muban() {
        System.out.println("就这样实现了一个模板");
    }

    @Override
    public void test() {
        System.out.println("fugai");
    }

    public void test(String test) {
        System.out.println("this is the second default..." + test);
    }
}
